<?php
class InsuranceRule {
	private $normal;
	private $highTech;
	private $cancerDrug;
	private $transport;

	const ITEM_TYPE_NORMAL         =   'normal';
	const ITEM_TYPE_HIGH_TECH      =   'highTech';
	const ITEM_TYPE_CANCER_DRUG    =   'cancerDrug';
	const ITEM_TYPE_TRANSPORT      =   'transport';

	public function setNormal($objRuleData) {
        $this->normal   =   $objRuleData;
	}

	public function setHighTech($objRuleData) {
		$this->highTech   =   $objRuleData;
	}

    public function setCancerDrug($objRuleData) {
        $this->cancerDrug   =   $objRuleData;
    }

    public function setTransport($objRuleData) {
        $this->transport   =   $objRuleData;
    }

    public function getRuleData($billableItem) {
        $insuranceType  =   EnforceType::int($billableItem->getInsuranceType());
        $insuranceType  =   Utils::getEnumValue(EnumerationConstant::INSURANCE_GROUP, $insuranceType);
        switch ($insuranceType) {
        	case EnumerationConstant::INSURANCE_GROUP_SERVICE:
            case EnumerationConstant::INSURANCE_GROUP_DRUG_MATERIAL:
            	return $this->normal;
            case EnumerationConstant::INSURANCE_GROUP_HIGH_TECH:
                return $this->highTech;
            case EnumerationConstant::INSURANCE_GROUP_CANCER_DRUG:
                return $this->cancerDrug;
            case EnumerationConstant::INSURANCE_GROUP_TRANSPORT:
                return $this->transport;
            default:
            	return false;
        }
    }
}
?>